const deepFind = (options:any, val:any) => {
  for (let i = 0; i < options.length; i++) {
    let item = options[i]
    if (item.value == val) return item
    if (item.children && item.children.length) {
      let res:any = deepFind(item.children, val)
      if (res) return res
    }
  }
}
export default function dicFormatter(options:any, val:any) {
  let find = deepFind(options, val)
  return find?.label || val
}
